using Dew.Math;
using Dew.Math.Editors;
using Dew.Math.Units;
using Dew.Signal;
using Dew.Signal.Units;
using Dew.Math.Tee;
using Dew.Signal.Tee;
private void button1_Click(
object sender, EventArgs e)
{
Vector b =
MtxExpr.Sin(
MtxExpr.Ramp(256, TMtxFloatPrecision.mvDouble,0,2*Math.PI*6/256));
Vector c =
new Vector(b.Length);
Vector Response1 =
new Vector(0);
Vector Response2 =
new Vector(0);
c.Copy(b);
SignalUtils.BandFlip(b);
MtxVecTee.DrawIt(
new TVec[2] {c,b},
new string[2] {"Original signal","Flipped signal"},"Band flipped time signal",
false);
SignalUtils.FrequencyResponse(c,
null, Response1, 1,
true, TSignalWindowType.wtRectangular, 0);
SignalUtils.FrequencyResponse(b,
null, Response2, 1,
true, TSignalWindowType.wtRectangular, 0);
MtxVecTee.DrawIt(
new TVec[2] {Response1,Response2},
new string[2] {"Spectrum: original signal","Spectrum: flipped signal"}, "Band flipped frequency spectrum",
false);
}